

<!--评论创建时间页面-->

<div th:include="amd.html::head-title"></div>
<script>
    var myChart = echarts.init(document.getElementById('main'));
    var all = [];
    $.ajax({
            type: "GET",
            url: "/creationtime/list",
            dataType: "json",
            async: false,
            success: function (data) {
                for (var i = 0; i < data.length; i++) {
                    all[i] = {
                        "value": data[i].num,
                        "name": data[i].creationtime
                    };
                }

            }
        }
    );
    var xray = [];
    for (var i = 0; i < all.length; i++) {
        xray[i] = all[i].name;
    }
    var option = {

        series: [
            {
                type: 'pie',
                data: all
            }]
    };
    myChart.setOption(option);
</script>

</div>

</body>

</html>
</div>